package com.yrihr.wisdom.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yrihr.wisdom.entity.Interval;
import com.yrihr.wisdom.mapper.IntervalMapper;
import com.yrihr.wisdom.service.IntervalService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : IntervalServiceImpl
 * @Description :
 * @Author : wind
 * @Date: 2020-12-23 14:57
 * @Version 1.0
 */
@Service
@RequiredArgsConstructor
public class IntervalServiceImpl extends ServiceImpl<IntervalMapper, Interval> implements IntervalService {
    /**
     * 查询站点信息
     *
     * @return
     */
    @Override
    public List<Interval> selectInterval() {
        QueryWrapper<Interval> query = Wrappers.query();
        query.eq("status","1");
        query.orderByAsc("id");
        return baseMapper.selectList(query);
    }
}
